function getURLVar(urlVarName) {
	var urlHalves = String(document.location).split('?');
	var urlVarValue = '';
	if(urlHalves[1]){var urlVars = urlHalves[1].split('&');for(i=0; i<=(urlVars.length); i++){if(urlVars[i]){var urlVarPair = urlVars[i].split('=');if (urlVarPair[0] && urlVarPair[0] == urlVarName) {urlVarValue = urlVarPair[1];}}}}
	return urlVarValue;
}
	$(document).ready(
		function(){
			var pa_id=getURLVar('pa_id');
			$.ajax({
		        url: '../../sys/com/control/ProductServices.php?action=querySpecialPriceProudction',
		        type: 'get',
		        dataType: 'json',
		        success: function(data) {
		        	//data=jQuery.parseJSON(data);
		        	if(data.length && data.length>2)
	        		{
		        		var proAttr=data[0];
			        	$("#src1").attr("src","../../admin/product/images/"+proAttr.pic);
			        	$("#url1").html(proAttr.p_name);
			        	$("#url1").attr("href","../../List_pages/contant/content.php?pa_id="+proAttr.p_id);
			        	$("#price1").html(proAttr.price);
		        		var proAttr=data[1];
			        	$("#src2").attr("src","../../admin/product/images/"+proAttr.pic);
			        	$("#url2").html(proAttr.p_name);
			        	$("#url2").attr("href","../../List_pages/contant/content.php?pa_id="+proAttr.p_id);
			        	$("#price2").html(proAttr.price);
		        		var proAttr=data[2];
			        	$("#src3").attr("src","../../admin/product/images/"+proAttr.pic);
			        	$("#url3").html(proAttr.p_name);
			        	$("#url3").attr("href","../../List_pages/contant/content.php?pa_id="+proAttr.p_id);
			        	$("#price3").html(proAttr.price);
	        		
	        		}
		        	else if(data.length && data.length>1)
	        		{
		        		var proAttr=data[0];
			        	$("#src1").attr("src","../../admin/product/images/"+proAttr.pic);
			        	$("#url1").html(proAttr.p_name);
			        	$("#url1").attr("href","../../List_pages/contant/content.php?pa_id="+proAttr.p_id);
			        	$("#price1").html(proAttr.price);
		        		var proAttr=data[1];
			        	$("#src2").attr("src","../../admin/product/images/"+proAttr.pic);
			        	$("#url2").html(proAttr.p_name);
			        	$("#url2").attr("href","../../List_pages/contant/content.php?pa_id="+proAttr.p_id);
			        	$("#price2").html(proAttr.price);
		        		var proAttr=data[1];
			        	$("#src3").attr("src","../../admin/product/images/"+proAttr.pic);
			        	$("#url3").html(proAttr.p_name);
			        	$("#url3").attr("href","../../List_pages/contant/content.php?pa_id="+proAttr.p_id);
			        	$("#price3").html(proAttr.price);
	        		}
		        	else if(data.length && data.length>0)
	        		{
		        		var proAttr=data[0];
			        	$("#src1").attr("src","../../admin/product/images/"+proAttr.pic);
			        	$("#url1").html(proAttr.p_name);
			        	$("#url1").attr("href",".../../List_pages/contant/content.php?pa_id="+proAttr.p_id);
			        	$("#price1").html(proAttr.price);
		        		var proAttr=data[0];
			        	$("#src2").attr("src","../../admin/product/images/"+proAttr.pic);
			        	$("#url2").html(proAttr.p_name);
			        	$("#url2").attr("href","../../List_pages/contant/content.php?pa_id="+proAttr.p_id);
			        	$("#price2").html(proAttr.price);
		        		var proAttr=data[0];
			        	$("#src3").attr("src","../../admin/product/images/"+proAttr.pic);
			        	$("#url3").html(proAttr.p_name);
			        	$("#url3").attr("href","../../List_pages/contant/content.php?pa_id="+proAttr.p_id);
			        	$("#price3").html(proAttr.price);
	        		
	        		}
		        	var proAttr=data[0];
		        	
		        	//alert($("#p_name"));
		          },
		          error:function(data){
		        	  alert(data.responseText);
		          }
		        });
			
		}
	);